import { apiPrefix } from '@/consts/consts'

export default ({ $service:request }) => ({
  // 4.5.11. 客户机构列表
  orgList(params) {
    return request({
      url: `${apiPrefix}/api/v1/customer/organization/list`,
      method: 'get',
      params
    })
  },

  // 4.5.12. 添加客户机构
  orgAdd(data) {
    return request({
      url: `${apiPrefix}/api/v1/customer/organization/add`,
      method: 'post',
      data
    })
  },
  
  // 4.5.13. 修改客户机构
  orgUpdate(data, id) {
    return request({
      url: `${apiPrefix}/api/v1/customer/organization/update/${id}`,
      method: 'put',
      data
    })
  },
    
  // 4.5.14. 删除客户机构
  orgDelete(id) {
    return request({
      url: `${apiPrefix}/api/v1/customer/organization/delete/${id}`,
      method: 'delete',
    })
  },
    //  4.5.14. 修改机构模式
  modefiyType(data,id) {
      return request({
        url: `${apiPrefix}/api/v1/customer/organization/switch/type/${id}`,
        method: 'put',
        data
      })
    },
  
})
